#!/bin/sh

set -e

echo "216" >> /home/nvidia/HYSD_shell/systemShell.log 2>&1
gpiopath="/sys/class/gpio/gpio216"
direction=${gpiopath}"/direction"
value=${gpiopath}"/value"
data=0

if [ -d ${gpiopath} ]; then
    echo 216 > /sys/class/gpio/unexport
fi

echo 216 > /sys/class/gpio/export
echo out > ${direction}
echo 1 > ${value}
data=$(cat ${value})
sleep 1s
echo 0 > ${value}
data=$(cat ${value})

#echo 216 > /sys/class/gpio/unexport

